package com.greenant.store.bean;

import com.avos.avoscloud.AVACL;
import com.avos.avoscloud.AVClassName;
import com.avos.avoscloud.AVRole;

@AVClassName(AntAVObject.CLASS_SHOPPINGCART)
public class ShoppingCart extends AntAVObject
{
    public static final String ATTR_AntGoodsID = "AntGoodsId";//商品id
    public static final String ATTR_SECTIONNUM = "sectionNum";//区域
    public static final String ATTR_STYLE = "style";// 姚江东路
    public static final String ATTR_STOREID = "storeId";// 商店ID
    public static final String ATTR_USERID = "userId";// 用户id
    public static final String ATTR_COST = "cost";//花费
    public static final String ATTR_QUANTITY = "quantity";// 数量
    

    

    private AVRole customRole;

    private AntGoods antGoods;
    
    public ShoppingCart()
    {
        super();
        setAccessCtrl();
    }

    public ShoppingCart(String str)
    {
        super(str);
        setAccessCtrl();
    }

    public String getAntGoodsid()
    {
        return this.getString(ATTR_AntGoodsID);
    }

    public void setAntGoodsid(String AntGoodsid)
    {
        this.put(ATTR_AntGoodsID, AntGoodsid);
    }
    
    public double getQuantity()
    {
        return this.getDouble(ATTR_QUANTITY);
    }

    public void setQuantity(double uptown)
    {
        this.put(ATTR_QUANTITY, uptown);
    }
    
    public String getStyle()
    {
        return this.getString(ATTR_STYLE);
    }

    public void setStyle(String street)
    {
        this.put(ATTR_STYLE, street);
    }
    
    public String getStoreId()
    {
        return this.getString(ATTR_STOREID);
    }

    public void setStoreId(String area)
    {
        this.put(ATTR_STOREID, area);
    }
    
//    public String getImageUrl()
//    {
//        return this.getString(ATTR_IMAGE);
//    }
//
//    public void setImageUrl(String area)
//    {
//        this.put(ATTR_IMAGE, area);
//    }
    
    public int getSectionNum()
    {
        return this.getInt(ATTR_SECTIONNUM);
    }

    public void setSectionNum(int city)
    {
        this.put(ATTR_SECTIONNUM, city);
    }
    
    public double getCost()
    {
        return this.getDouble(ATTR_COST);
    }

    public void setCost(double province)
    {
        this.put(ATTR_COST, province);
    }
    
 

    public ShoppingCart getInstance()
    {
        return this;
    }

    public String getUserId()
    {
        return this.getString(ATTR_USERID);
    }

    public void setUserId(String userId)
    {
        this.put(ATTR_USERID, userId);
    }

    
    private int setAccessCtrl()
    {

        acl = new AVACL();
        acl.setPublicReadAccess(true);
        acl.setPublicWriteAccess(true);
        return 0;
    }

    public AntGoods getAntGoods()
    {
        return antGoods;
    }

    public void setAntGoods(AntGoods goods)
    {
        this.antGoods = goods;
    }

}
